﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;
using Entity;
using HighLowBase.Entity;

namespace HighLowBase
{
    public class HiLoSessionDetail
    {
        public static int InsertSessionDetail(int accountId, int hiLoGameId, long hiLoSessionId,
            int auBegin, int agBegin, int auEnd, int agEnd, int currentValue, int randomValue,
            int hiLoSelected, int hiLoResult, bool isExtraLife, bool isOutOf, bool isNudges, bool isFreeSpin,
            bool isJackpot, bool isCollect, int round, int resultCode, string description)
        {
            long? id = 0;
            int r = DB.HighLowGameInstance.uspBaseHiLoSessionDetailInsert(accountId, hiLoGameId, hiLoSessionId, 
                auBegin, agBegin, auEnd, agEnd, currentValue, randomValue, hiLoSelected, hiLoResult, 
                isExtraLife, isOutOf, isNudges, isFreeSpin, isJackpot, isCollect, round, resultCode, description, ref id);
            if (id.Value > 0)
                return 1;
            else
                return 0;
        }
    }
}
